import React from 'react';

export default function PngIcon({...props}){
    const { width = '20px', src } = props;
    const outerStyle = {
        width,
        height: width,
        display: 'inline-block',
        overflow: 'hidden'
    }
    const innerStyle = {
        ...outerStyle,
        position: 'relative',
        background: `url(${src}) no-repeat center`,
        left: `-${width}`,
        WebkitFilter: `drop-shadow(${width} 0)`,
        filter: `drop-shadow(${width} 0)`
    }
    return (
        <i style={outerStyle}>
            <i style={innerStyle} />
        </i>
    )
}